import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const DASHBOARD: AppRouteRecordRaw = {
  path: '/content',
  name: 'content',
  component: DEFAULT_LAYOUT,
  meta: {
    title: '内容管理',
    requiresAuth: true,
    icon: 'icon-bookmark',
    order: 6,
  },
  children: [
    {
      path: '',
      name: 'ContentList',
      component: () => import('@/views/content/index.vue'),
      meta: {
        title: '所有资讯',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'create',
      name: 'ContentCreate',
      component: () => import('@/views/content/create.vue'),
      meta: {
        title: '发布资讯',
        hideInMenu: true,
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'category',
      name: 'ContentCategory',
      component: () => import('@/views/content/category.vue'),
      meta: {
        title: '资讯分类',
        requiresAuth: true,
        roles: ['*'],
      },
    },
  ],
};

export default DASHBOARD;
